//
//  ContactData.h
//  DataTransfer
//
//  Created by 宋润理 on 2023/12/16.
//  Copyright © 2023 iCocos. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <Contacts/Contacts.h>

NS_ASSUME_NONNULL_BEGIN

@interface ContactData : NSObject
@property (nonatomic, copy) NSString *givenName;
@property (nonatomic, copy) NSString *familyName;
@property (nonatomic, strong) NSData *photoData;
@property (nonatomic, strong) NSArray<CNLabeledValue<CNPhoneNumber *> *> *phoneNumbers;
@property (nonatomic, strong) NSArray<CNLabeledValue<NSString *> *> *emailAddresses;
@property (nonatomic, strong) NSArray<CNLabeledValue<NSString *> *> *urlAddresses;
@property (nonatomic, strong) NSArray<CNLabeledValue<CNPostalAddress *> *> *postalAddresses;
@property (nonatomic, strong) NSDateComponents *birthday;

- (NSDictionary *)dictionaryFromContactData;
+ (id)contactDataFromDict:(NSDictionary *)dict;
@end

NS_ASSUME_NONNULL_END
